package sgi.client;

import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.sql.SQLException;

import javax.swing.JFrame;
import javax.swing.JLabel;

import com.sun.rowset.CachedRowSetImpl;

public class MonthlyComplaintsReportPanel extends JFrame {

	public MonthlyComplaintsReportPanel(CachedRowSetImpl reportInfo) throws SQLException {
		setTitle("SGI Monthly Complaints Report");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		reportInfo.next();
		
		GridBagLayout gridBagLayout = new GridBagLayout();
		gridBagLayout.columnWidths = new int[]{0, 0, 0, 0, 0, 0};
		gridBagLayout.rowHeights = new int[]{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
		gridBagLayout.columnWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
		gridBagLayout.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
		getContentPane().setLayout(gridBagLayout);
		
		JLabel lblDate = new JLabel("Date: ");
		GridBagConstraints gbc_lblDate = new GridBagConstraints();
		gbc_lblDate.insets = new Insets(0, 0, 5, 5);
		gbc_lblDate.gridx = 1;
		gbc_lblDate.gridy = 1;
		getContentPane().add(lblDate, gbc_lblDate);
		
		JLabel lblAdate = new JLabel("aDate");
		if (reportInfo != null)
			lblAdate.setText(reportInfo.getString(1));
		GridBagConstraints gbc_lblAdate = new GridBagConstraints();
		gbc_lblAdate.insets = new Insets(0, 0, 5, 5);
		gbc_lblAdate.gridx = 2;
		gbc_lblAdate.gridy = 1;
		getContentPane().add(lblAdate, gbc_lblAdate);
		
		JLabel lblTotalAmount = new JLabel("Total Amount: ");
		GridBagConstraints gbc_lblTotalAmount = new GridBagConstraints();
		gbc_lblTotalAmount.insets = new Insets(0, 0, 5, 5);
		gbc_lblTotalAmount.gridx = 2;
		gbc_lblTotalAmount.gridy = 4;
		getContentPane().add(lblTotalAmount, gbc_lblTotalAmount);
		
		JLabel lblAtotalAmount = new JLabel("aTotalAmount");
		if (reportInfo != null)
			lblAdate.setText(reportInfo.getString(2));
		GridBagConstraints gbc_lblAtotalAmount = new GridBagConstraints();
		gbc_lblAtotalAmount.insets = new Insets(0, 0, 5, 5);
		gbc_lblAtotalAmount.gridx = 3;
		gbc_lblAtotalAmount.gridy = 4;
		getContentPane().add(lblAtotalAmount, gbc_lblAtotalAmount);
		
		JLabel lblPending = new JLabel("Pending: ");
		GridBagConstraints gbc_lblPending = new GridBagConstraints();
		gbc_lblPending.insets = new Insets(0, 0, 5, 5);
		gbc_lblPending.gridx = 2;
		gbc_lblPending.gridy = 6;
		getContentPane().add(lblPending, gbc_lblPending);
		
		JLabel lblApending = new JLabel("aPending");
		if (reportInfo != null)
			lblAdate.setText(reportInfo.getString(3));
		GridBagConstraints gbc_lblApending = new GridBagConstraints();
		gbc_lblApending.insets = new Insets(0, 0, 5, 5);
		gbc_lblApending.gridx = 3;
		gbc_lblApending.gridy = 6;
		getContentPane().add(lblApending, gbc_lblApending);
		
		JLabel lblApproved = new JLabel("Approved:");
		GridBagConstraints gbc_lblApproved = new GridBagConstraints();
		gbc_lblApproved.insets = new Insets(0, 0, 5, 5);
		gbc_lblApproved.gridx = 2;
		gbc_lblApproved.gridy = 8;
		getContentPane().add(lblApproved, gbc_lblApproved);
		
		JLabel lblAapproved = new JLabel("aApproved");
		if (reportInfo != null)
			lblAdate.setText(reportInfo.getString(4));
		GridBagConstraints gbc_lblAapproved = new GridBagConstraints();
		gbc_lblAapproved.insets = new Insets(0, 0, 5, 5);
		gbc_lblAapproved.gridx = 3;
		gbc_lblAapproved.gridy = 8;
		getContentPane().add(lblAapproved, gbc_lblAapproved);
		
		JLabel lblDeclined = new JLabel("Declined: ");
		GridBagConstraints gbc_lblDeclined = new GridBagConstraints();
		gbc_lblDeclined.insets = new Insets(0, 0, 5, 5);
		gbc_lblDeclined.gridx = 2;
		gbc_lblDeclined.gridy = 10;
		getContentPane().add(lblDeclined, gbc_lblDeclined);
		
		JLabel lblAdeclined = new JLabel("aDeclined");
		if (reportInfo != null)
			lblAdate.setText(reportInfo.getString(5));
		GridBagConstraints gbc_lblAdeclined = new GridBagConstraints();
		gbc_lblAdeclined.insets = new Insets(0, 0, 5, 5);
		gbc_lblAdeclined.gridx = 3;
		gbc_lblAdeclined.gridy = 10;
		getContentPane().add(lblAdeclined, gbc_lblAdeclined);
		
		JLabel lblTypeEmployeeBehavior = new JLabel("Type Employee Behavior: ");
		GridBagConstraints gbc_lblTypeEmployeeBehavior = new GridBagConstraints();
		gbc_lblTypeEmployeeBehavior.insets = new Insets(0, 0, 5, 5);
		gbc_lblTypeEmployeeBehavior.gridx = 2;
		gbc_lblTypeEmployeeBehavior.gridy = 12;
		getContentPane().add(lblTypeEmployeeBehavior, gbc_lblTypeEmployeeBehavior);
		
		JLabel lblAtypeemployeebehavior = new JLabel("aTypeEmployeeBehavior");
		if (reportInfo != null)
			lblAdate.setText(reportInfo.getString(6));
		GridBagConstraints gbc_lblAtypeemployeebehavior = new GridBagConstraints();
		gbc_lblAtypeemployeebehavior.insets = new Insets(0, 0, 5, 5);
		gbc_lblAtypeemployeebehavior.gridx = 3;
		gbc_lblAtypeemployeebehavior.gridy = 12;
		getContentPane().add(lblAtypeemployeebehavior, gbc_lblAtypeemployeebehavior);
		
		JLabel lblTypeInsufficientContent = new JLabel("Type Insufficient Content: ");
		GridBagConstraints gbc_lblTypeInsufficientContent = new GridBagConstraints();
		gbc_lblTypeInsufficientContent.insets = new Insets(0, 0, 5, 5);
		gbc_lblTypeInsufficientContent.gridx = 2;
		gbc_lblTypeInsufficientContent.gridy = 14;
		getContentPane().add(lblTypeInsufficientContent, gbc_lblTypeInsufficientContent);
		
		JLabel lblAtypeinsufficientcontent = new JLabel("aTypeInsufficientContent");
		if (reportInfo != null)
			lblAdate.setText(reportInfo.getString(7));
		GridBagConstraints gbc_lblAtypeinsufficientcontent = new GridBagConstraints();
		gbc_lblAtypeinsufficientcontent.insets = new Insets(0, 0, 5, 5);
		gbc_lblAtypeinsufficientcontent.gridx = 3;
		gbc_lblAtypeinsufficientcontent.gridy = 14;
		getContentPane().add(lblAtypeinsufficientcontent, gbc_lblAtypeinsufficientcontent);
		
		JLabel lblTypePrices = new JLabel("Type Prices:");
		GridBagConstraints gbc_lblTypePrices = new GridBagConstraints();
		gbc_lblTypePrices.insets = new Insets(0, 0, 5, 5);
		gbc_lblTypePrices.gridx = 2;
		gbc_lblTypePrices.gridy = 16;
		getContentPane().add(lblTypePrices, gbc_lblTypePrices);
		
		JLabel lblAtypeprices = new JLabel("aTypePrices");
		if (reportInfo != null)
			lblAdate.setText(reportInfo.getString(8));
		GridBagConstraints gbc_lblAtypeprices = new GridBagConstraints();
		gbc_lblAtypeprices.insets = new Insets(0, 0, 5, 5);
		gbc_lblAtypeprices.gridx = 3;
		gbc_lblAtypeprices.gridy = 16;
		getContentPane().add(lblAtypeprices, gbc_lblAtypeprices);
		
		JLabel lblTypeOther = new JLabel("Type Other: ");
		GridBagConstraints gbc_lblTypeOther = new GridBagConstraints();
		gbc_lblTypeOther.insets = new Insets(0, 0, 0, 5);
		gbc_lblTypeOther.gridx = 2;
		gbc_lblTypeOther.gridy = 18;
		getContentPane().add(lblTypeOther, gbc_lblTypeOther);
		
		JLabel lblAtypeother = new JLabel("aTypeOther");
		if (reportInfo != null)
			lblAdate.setText(reportInfo.getString(9));
		GridBagConstraints gbc_lblAtypeother = new GridBagConstraints();
		gbc_lblAtypeother.insets = new Insets(0, 0, 0, 5);
		gbc_lblAtypeother.gridx = 3;
		gbc_lblAtypeother.gridy = 18;
		getContentPane().add(lblAtypeother, gbc_lblAtypeother);
		reportInfo.next();
		
	}
}
